# -*- coding:utf-8 -*-
__author__ = 'LangJin'
from loguru import logger
from app import create_app
import time

app = create_app()


if __name__ != "__main__":  
    # enqueue开启多线程写入，会和gunicorn冲突，导致gunicorn无法正常启动，无限重启
    logger.add(f'logs/debug-{time.strftime("%Y-%m-%d")}.log',rotation="00:00",encoding="utf-8",enqueue=False,retention="7 days")



if __name__ == "__main__":  
    app.run(host="0.0.0.0",port=3456)
